import { createStore } from "vuex";
import getters from "./getters";
import category from "./modules/category";
import theme from "./modules/theme";
import app from "./modules/app";
import user from "./modules/user";
import search from "./modules/search";
import createPersistedState from "vuex-persistedstate";

const store = createStore({
  getters,
  modules: {
    category,
    theme,
    app,
    search,
    user
  },
  plugins: [
    createPersistedState({
      key: "front-web",
      paths: ["category", "theme", "search", "user"],
    }),
  ],
});

export default store;
